﻿Imports System.ComponentModel
Imports System.Windows.Data
Imports System.Data.SQLite

Public Class WatchList

    Implements INotifyPropertyChanged

    Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged

    Private _WatchList As New List(Of WatchView)
    Private _DBContext As DBContext
    Private BGLoader As New BackgroundWorker
    Public Sub New()

    End Sub

    Public Sub New(DB As DBContext)
        _DBContext = DB
        _DBContext.LoadWatches(_WatchList)
    End Sub


    Public ReadOnly Property List As ICollectionView
        Get
            Dim c As ICollectionView = CollectionViewSource.GetDefaultView(_WatchList)

            Return c
        End Get

    End Property

End Class
